package cn.iocoder.yudao.module.shop.controller.admin.shopOpenTime.vo;

import cn.iocoder.yudao.module.shop.framework.core.databind.WeekStringDeSerializer;
import cn.iocoder.yudao.module.shop.framework.core.databind.WeekStringSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalTime;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;

@Schema(description = "管理后台 - 商户营业时间 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ShopOpenTimeRespVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "店铺id", example = "1")
    @ExcelProperty("店铺id")
    private Long shopId;

    @Schema(description = "周期")
    @ExcelProperty("周期")
    @JsonSerialize(using = WeekStringSerializer.class)
    @JsonDeserialize(using = WeekStringDeSerializer.class)
    private String day;

    @Schema(description = "营业开始时间")
    @ExcelProperty("营业开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
    private LocalTime openingTime;

    @Schema(description = "营业结束时间")
    @ExcelProperty("营业结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
    private LocalTime closingTime;

    @Schema(description = "是否休息日")
    @ExcelProperty("是否休息日")
    private Boolean isCloseDay;

    @Schema(description = "是否24小时营业")
    @ExcelProperty("是否24小时营业")
    private Boolean isOpenAllDay;

    @Schema(description = "备注")
    @ExcelProperty("备注")
    private String remarks;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}